How to: Calculate Weight in an Allocation Rule

The Allocation Rule is a definition of how great a share of the available items in the warehouse is sent to a particular Store, Store Group, Location, Customer Group, or Customer. The user can set up the shares by manually filling the Weight field. Additionally, the system provides a functionality to calculate the Weight field based on historical sales data or store size.

To calculate the Weight field manually

  1. Navigate to LS Retail - Replenishment - Manual - Allocation Rules to open the Allocation Rule list.
  2. Create a new Allocation Rule, or select an existing Allocation Rule from the list.
  3. On the Allocation Rule page, open the Calculation FastTab.
  4. Select an Allocation Rule Calculation in the Rule Calculation Code field.
    Other fields on this FastTab will be updated based on your selection.
  5. Click the Calculate action on the Home menu.

The system re-calculates the Weight and % Share fields in all lines based on the selected Allocation Rule Calculation.

To calculate the Weight field with Scheduler

On the Allocation Rule Page:

  1. Navigate to LS Retail - Replenishment - Manual - Allocation Rules to open the Allocation Rule list.
  2. Create a new Allocation Rule, or select an existing Allocation Rule from the list.
  3. On the Allocation Rule page, open the Calculation FastTab.
  4. Select an Allocation Rule Calculation in the the Rule Calculation Code field.
    Other fields in this FastTab will be updated based on your selection.
  5. Set the Run Frequency field to a value other than Run Manually.

On the Scheduler Job page:

  1. Navigate to LS Retail - Scheduler - Scheduler - Jobs to open the Jobs list.
  2. Create a new Scheduler Job, or select the Scheduler Job with Job ID of REPLENALLOCATION from the list.
  3. Set the Object Type field to Codeunit.
  4. Set the Object No. field to 10012217.
  5. Set the calculation frequency in the Schedule Details FastTab. This job is usually calculated on a daily or weekly basis.

The Scheduler job will perform the same calculation as the Calculate action in the Home menu.

To set up an Allocation Rule Calculation

The Allocation Rule Calculation defines how the Weight field is recalculated. You can access the Allocation Rule Calculation by doing a lookup in the Rule Calculation Code field on the Allocation Rule page.

  1. Create a new Allocation Rule Calculation.
  2. Fill in the fields as described in the following table:
Field Description
Code This field is a unique identifier for the Allocation Rule Calculation.
Codeunit No. Here you select the codeunit which is used to calculate the Allocation Rule Calculation.

Codeunits provided by LS Retail:

  • 10012218, Alloc Rule Calc Weight by Qty.
  • 10012219, Alloc Rule Calc Weight Area
  • 10012220, Alloc Rule Calc Weight Turnove

Codeunit 10012218 calculates the weight based on the Quantity Sold. Any set filters on Item or Date level are considered in the calculation. The Turnover is calculated via the Valued Quantity field from the Value Entry table.

Codeunit 10012219 calculates the weight based on the Store Floor Area, which is set up on the Store Sections in the Section Size field. Any set filters on Item or Date level are ignored.

Codeunit 10012220 calculates the weight based on the Turnover. Any set filters on Item or Date level are considered in the calculation. The Turnover is calculated via the Sales Amount (Actual) field from the Value Entry table.

Description This is a description of the Allocation Rule Calculation.
Item Division Code

Item Category Code

Product Group Code

Item No.

Here you specify Item-based filters for the calculation. These filters are only considered in the calculation Codeunits 10012218 and 10012220.
Date Calculation Type This field specifies, which Date-based filter should be used. The options are:
  • Date
  • Date Formula

When you select the option Date, the fields Starting Date and Ending Date are considered as Date-based filters.

When the option Date Formula is selected, the fields Date Formula for Start Date and Date Formula for End Date are considered as Date-based filters.

Date Formula for Start Date

Date Formula for End Date

Here you can specify a Date-based filter by using Date Formulas, like 1Y, CY-1M, and so on.
Starting Date

Ending Date

Here you can specify a Date-based filter by using Date values, like 01.01.2007, 31.12.2007, and so on.

See Also

Allocation Rule

How to: Add Stores from Store Hierarchy